3.2.26 \(\int \frac {x^2 (c+d x^2+e x^4+f x^6)}{(a+b x^2)^2} \, dx\) [126]

3.2.26.1 Optimal result
3.2.26.2 Mathematica [A] (verified)
3.2.26.3 Rubi [A] (verified)
3.2.26.4 Maple [A] (verified)
3.2.26.5 Fricas [A] (verification not implemented)
3.2.26.6 Sympy [A] (verification not implemented)
3.2.26.7 Maxima [A] (verification not implemented)
3.2.26.8 Giac [A] (verification not implemented)
3.2.26.9 Mupad [B] (verification not implemented)

3.2.26.1 Optimal result

Integrand size = 30, antiderivative size = 163 \[ \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx=-\frac {\left (b^3 c-3 a b^2 d+5 a^2 b e-7 a^3 f\right ) x}{2 a b^4}+\frac {(b e-2 a f) x^3}{3 b^3}+\frac {f x^5}{5 b^2}+\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x^3}{2 a \left (a+b x^2\right )}+\frac {\left (b^3 c-3 a b^2 d+5 a^2 b e-7 a^3 f\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{9/2}} \]

output
-1/2*(-7*a^3*f+5*a^2*b*e-3*a*b^2*d+b^3*c)*x/a/b^4+1/3*(-2*a*f+b*e)*x^3/b^3 
+1/5*f*x^5/b^2+1/2*(c-a*(a^2*f-a*b*e+b^2*d)/b^3)*x^3/a/(b*x^2+a)+1/2*(-7*a 
^3*f+5*a^2*b*e-3*a*b^2*d+b^3*c)*arctan(x*b^(1/2)/a^(1/2))/b^(9/2)/a^(1/2)
 
3.2.26.2 Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.91 \[ \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx=\frac {\left (b^2 d-2 a b e+3 a^2 f\right ) x}{b^4}+\frac {(b e-2 a f) x^3}{3 b^3}+\frac {f x^5}{5 b^2}-\frac {\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x}{2 b^4 \left (a+b x^2\right )}-\frac {\left (-b^3 c+3 a b^2 d-5 a^2 b e+7 a^3 f\right ) \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{9/2}} \]

input
Integrate[(x^2*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2)^2,x]
 
output
((b^2*d - 2*a*b*e + 3*a^2*f)*x)/b^4 + ((b*e - 2*a*f)*x^3)/(3*b^3) + (f*x^5 
)/(5*b^2) - ((b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x)/(2*b^4*(a + b*x^2)) - 
((-(b^3*c) + 3*a*b^2*d - 5*a^2*b*e + 7*a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]]) 
/(2*Sqrt[a]*b^(9/2))
 
3.2.26.3 Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.01, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2335, 9, 1584, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx\)

\(\Big \downarrow \) 2335

\(\displaystyle \frac {x^3 \left (c-\frac {a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}-\frac {\int \frac {x \left (-2 a f x^5-2 a \left (e-\frac {a f}{b}\right ) x^3+\left (-\frac {3 f a^3}{b^2}+\frac {3 e a^2}{b}-3 d a+b c\right ) x\right )}{b x^2+a}dx}{2 a b}\)

\(\Big \downarrow \) 9

\(\displaystyle \frac {x^3 \left (c-\frac {a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}-\frac {\int \frac {x^2 \left (-2 a f x^4-2 a \left (e-\frac {a f}{b}\right ) x^2+b c-3 a d+\frac {3 a^2 e}{b}-\frac {3 a^3 f}{b^2}\right )}{b x^2+a}dx}{2 a b}\)

\(\Big \downarrow \) 1584

\(\displaystyle \frac {x^3 \left (c-\frac {a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}-\frac {\int \left (-\frac {2 a f x^4}{b}-\frac {2 a (b e-2 a f) x^2}{b^2}+c-\frac {a \left (7 f a^2-5 b e a+3 b^2 d\right )}{b^3}+\frac {7 f a^4-5 b e a^3+3 b^2 d a^2-b^3 c a}{b^3 \left (b x^2+a\right )}\right )dx}{2 a b}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {x^3 \left (c-\frac {a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}-\frac {x \left (c-\frac {a \left (7 a^2 f-5 a b e+3 b^2 d\right )}{b^3}\right )-\frac {\sqrt {a} \arctan \left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (-7 a^3 f+5 a^2 b e-3 a b^2 d+b^3 c\right )}{b^{7/2}}-\frac {2 a x^3 (b e-2 a f)}{3 b^2}-\frac {2 a f x^5}{5 b}}{2 a b}\)

input
Int[(x^2*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2)^2,x]
 
output
((c - (a*(b^2*d - a*b*e + a^2*f))/b^3)*x^3)/(2*a*(a + b*x^2)) - ((c - (a*( 
3*b^2*d - 5*a*b*e + 7*a^2*f))/b^3)*x - (2*a*(b*e - 2*a*f)*x^3)/(3*b^2) - ( 
2*a*f*x^5)/(5*b) - (Sqrt[a]*(b^3*c - 3*a*b^2*d + 5*a^2*b*e - 7*a^3*f)*ArcT 
an[(Sqrt[b]*x)/Sqrt[a]])/b^(7/2))/(2*a*b)
 

3.2.26.3.1 Defintions of rubi rules used

rule 9
Int[(u_.)*(Px_)^(p_.)*((e_.)*(x_))^(m_.), x_Symbol] :> With[{r = Expon[Px, 
x, Min]}, Simp[1/e^(p*r)   Int[u*(e*x)^(m + p*r)*ExpandToSum[Px/x^r, x]^p, 
x], x] /; IGtQ[r, 0]] /; FreeQ[{e, m}, x] && PolyQ[Px, x] && IntegerQ[p] && 
  !MonomialQ[Px, x]
 

rule 1584
Int[((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + ( 
c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(f*x)^m*(d + e*x^2)^q* 
(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && NeQ[ 
b^2 - 4*a*c, 0] && IGtQ[p, 0] && IGtQ[q, -2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2335
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[ 
{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[PolynomialRemainder[Pq 
, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 
 1]}, Simp[(c*x)^m*(a + b*x^2)^(p + 1)*((a*g - b*f*x)/(2*a*b*(p + 1))), x] 
+ Simp[c/(2*a*b*(p + 1))   Int[(c*x)^(m - 1)*(a + b*x^2)^(p + 1)*ExpandToSu 
m[2*a*b*(p + 1)*x*Q - a*g*m + b*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, 
 b, c}, x] && PolyQ[Pq, x] && LtQ[p, -1] && GtQ[m, 0]
 
3.2.26.4 Maple [A] (verified)

Time = 3.46 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.85

method result size
default \(\frac {\frac {1}{5} f \,x^{5} b^{2}-\frac {2}{3} a b f \,x^{3}+\frac {1}{3} b^{2} e \,x^{3}+3 a^{2} f x -2 a b e x +b^{2} d x}{b^{4}}-\frac {\frac {\left (-\frac {1}{2} f \,a^{3}+\frac {1}{2} a^{2} b e -\frac {1}{2} a \,b^{2} d +\frac {1}{2} b^{3} c \right ) x}{b \,x^{2}+a}+\frac {\left (7 f \,a^{3}-5 a^{2} b e +3 a \,b^{2} d -b^{3} c \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}}}{b^{4}}\) \(139\)
risch \(\frac {f \,x^{5}}{5 b^{2}}-\frac {2 a f \,x^{3}}{3 b^{3}}+\frac {e \,x^{3}}{3 b^{2}}+\frac {3 a^{2} f x}{b^{4}}-\frac {2 a e x}{b^{3}}+\frac {d x}{b^{2}}+\frac {\left (\frac {1}{2} f \,a^{3}-\frac {1}{2} a^{2} b e +\frac {1}{2} a \,b^{2} d -\frac {1}{2} b^{3} c \right ) x}{b^{4} \left (b \,x^{2}+a \right )}-\frac {7 \ln \left (b x -\sqrt {-a b}\right ) f \,a^{3}}{4 b^{4} \sqrt {-a b}}+\frac {5 \ln \left (b x -\sqrt {-a b}\right ) a^{2} e}{4 b^{3} \sqrt {-a b}}-\frac {3 \ln \left (b x -\sqrt {-a b}\right ) a d}{4 b^{2} \sqrt {-a b}}+\frac {\ln \left (b x -\sqrt {-a b}\right ) c}{4 b \sqrt {-a b}}+\frac {7 \ln \left (-b x -\sqrt {-a b}\right ) f \,a^{3}}{4 b^{4} \sqrt {-a b}}-\frac {5 \ln \left (-b x -\sqrt {-a b}\right ) a^{2} e}{4 b^{3} \sqrt {-a b}}+\frac {3 \ln \left (-b x -\sqrt {-a b}\right ) a d}{4 b^{2} \sqrt {-a b}}-\frac {\ln \left (-b x -\sqrt {-a b}\right ) c}{4 b \sqrt {-a b}}\) \(313\)

input
int(x^2*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x,method=_RETURNVERBOSE)
 
output
1/b^4*(1/5*f*x^5*b^2-2/3*a*b*f*x^3+1/3*b^2*e*x^3+3*a^2*f*x-2*a*b*e*x+b^2*d 
*x)-1/b^4*((-1/2*f*a^3+1/2*a^2*b*e-1/2*a*b^2*d+1/2*b^3*c)*x/(b*x^2+a)+1/2* 
(7*a^3*f-5*a^2*b*e+3*a*b^2*d-b^3*c)/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2)))
 
3.2.26.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 418, normalized size of antiderivative = 2.56 \[ \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx=\left [\frac {12 \, a b^{4} f x^{7} + 4 \, {\left (5 \, a b^{4} e - 7 \, a^{2} b^{3} f\right )} x^{5} + 20 \, {\left (3 \, a b^{4} d - 5 \, a^{2} b^{3} e + 7 \, a^{3} b^{2} f\right )} x^{3} + 15 \, {\left (a b^{3} c - 3 \, a^{2} b^{2} d + 5 \, a^{3} b e - 7 \, a^{4} f + {\left (b^{4} c - 3 \, a b^{3} d + 5 \, a^{2} b^{2} e - 7 \, a^{3} b f\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) - 30 \, {\left (a b^{4} c - 3 \, a^{2} b^{3} d + 5 \, a^{3} b^{2} e - 7 \, a^{4} b f\right )} x}{60 \, {\left (a b^{6} x^{2} + a^{2} b^{5}\right )}}, \frac {6 \, a b^{4} f x^{7} + 2 \, {\left (5 \, a b^{4} e - 7 \, a^{2} b^{3} f\right )} x^{5} + 10 \, {\left (3 \, a b^{4} d - 5 \, a^{2} b^{3} e + 7 \, a^{3} b^{2} f\right )} x^{3} + 15 \, {\left (a b^{3} c - 3 \, a^{2} b^{2} d + 5 \, a^{3} b e - 7 \, a^{4} f + {\left (b^{4} c - 3 \, a b^{3} d + 5 \, a^{2} b^{2} e - 7 \, a^{3} b f\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) - 15 \, {\left (a b^{4} c - 3 \, a^{2} b^{3} d + 5 \, a^{3} b^{2} e - 7 \, a^{4} b f\right )} x}{30 \, {\left (a b^{6} x^{2} + a^{2} b^{5}\right )}}\right ] \]

input
integrate(x^2*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="fricas")
 
output
[1/60*(12*a*b^4*f*x^7 + 4*(5*a*b^4*e - 7*a^2*b^3*f)*x^5 + 20*(3*a*b^4*d - 
5*a^2*b^3*e + 7*a^3*b^2*f)*x^3 + 15*(a*b^3*c - 3*a^2*b^2*d + 5*a^3*b*e - 7 
*a^4*f + (b^4*c - 3*a*b^3*d + 5*a^2*b^2*e - 7*a^3*b*f)*x^2)*sqrt(-a*b)*log 
((b*x^2 + 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) - 30*(a*b^4*c - 3*a^2*b^3*d + 5 
*a^3*b^2*e - 7*a^4*b*f)*x)/(a*b^6*x^2 + a^2*b^5), 1/30*(6*a*b^4*f*x^7 + 2* 
(5*a*b^4*e - 7*a^2*b^3*f)*x^5 + 10*(3*a*b^4*d - 5*a^2*b^3*e + 7*a^3*b^2*f) 
*x^3 + 15*(a*b^3*c - 3*a^2*b^2*d + 5*a^3*b*e - 7*a^4*f + (b^4*c - 3*a*b^3* 
d + 5*a^2*b^2*e - 7*a^3*b*f)*x^2)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) - 15*(a* 
b^4*c - 3*a^2*b^3*d + 5*a^3*b^2*e - 7*a^4*b*f)*x)/(a*b^6*x^2 + a^2*b^5)]
 
3.2.26.6 Sympy [A] (verification not implemented)

Time = 0.98 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.36 \[ \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx=x^{3} \left (- \frac {2 a f}{3 b^{3}} + \frac {e}{3 b^{2}}\right ) + x \left (\frac {3 a^{2} f}{b^{4}} - \frac {2 a e}{b^{3}} + \frac {d}{b^{2}}\right ) + \frac {x \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right )}{2 a b^{4} + 2 b^{5} x^{2}} + \frac {\sqrt {- \frac {1}{a b^{9}}} \cdot \left (7 a^{3} f - 5 a^{2} b e + 3 a b^{2} d - b^{3} c\right ) \log {\left (- a b^{4} \sqrt {- \frac {1}{a b^{9}}} + x \right )}}{4} - \frac {\sqrt {- \frac {1}{a b^{9}}} \cdot \left (7 a^{3} f - 5 a^{2} b e + 3 a b^{2} d - b^{3} c\right ) \log {\left (a b^{4} \sqrt {- \frac {1}{a b^{9}}} + x \right )}}{4} + \frac {f x^{5}}{5 b^{2}} \]

input
integrate(x**2*(f*x**6+e*x**4+d*x**2+c)/(b*x**2+a)**2,x)
 
output
x**3*(-2*a*f/(3*b**3) + e/(3*b**2)) + x*(3*a**2*f/b**4 - 2*a*e/b**3 + d/b* 
*2) + x*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)/(2*a*b**4 + 2*b**5*x**2) + 
 sqrt(-1/(a*b**9))*(7*a**3*f - 5*a**2*b*e + 3*a*b**2*d - b**3*c)*log(-a*b* 
*4*sqrt(-1/(a*b**9)) + x)/4 - sqrt(-1/(a*b**9))*(7*a**3*f - 5*a**2*b*e + 3 
*a*b**2*d - b**3*c)*log(a*b**4*sqrt(-1/(a*b**9)) + x)/4 + f*x**5/(5*b**2)
 
3.2.26.7 Maxima [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.86 \[ \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx=-\frac {{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} x}{2 \, {\left (b^{5} x^{2} + a b^{4}\right )}} + \frac {{\left (b^{3} c - 3 \, a b^{2} d + 5 \, a^{2} b e - 7 \, a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{4}} + \frac {3 \, b^{2} f x^{5} + 5 \, {\left (b^{2} e - 2 \, a b f\right )} x^{3} + 15 \, {\left (b^{2} d - 2 \, a b e + 3 \, a^{2} f\right )} x}{15 \, b^{4}} \]

input
integrate(x^2*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="maxima")
 
output
-1/2*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x/(b^5*x^2 + a*b^4) + 1/2*(b^3*c 
- 3*a*b^2*d + 5*a^2*b*e - 7*a^3*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^4) + 
 1/15*(3*b^2*f*x^5 + 5*(b^2*e - 2*a*b*f)*x^3 + 15*(b^2*d - 2*a*b*e + 3*a^2 
*f)*x)/b^4
 
3.2.26.8 Giac [A] (verification not implemented)

Time = 0.37 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.91 \[ \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx=\frac {{\left (b^{3} c - 3 \, a b^{2} d + 5 \, a^{2} b e - 7 \, a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{4}} - \frac {b^{3} c x - a b^{2} d x + a^{2} b e x - a^{3} f x}{2 \, {\left (b x^{2} + a\right )} b^{4}} + \frac {3 \, b^{8} f x^{5} + 5 \, b^{8} e x^{3} - 10 \, a b^{7} f x^{3} + 15 \, b^{8} d x - 30 \, a b^{7} e x + 45 \, a^{2} b^{6} f x}{15 \, b^{10}} \]

input
integrate(x^2*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="giac")
 
output
1/2*(b^3*c - 3*a*b^2*d + 5*a^2*b*e - 7*a^3*f)*arctan(b*x/sqrt(a*b))/(sqrt( 
a*b)*b^4) - 1/2*(b^3*c*x - a*b^2*d*x + a^2*b*e*x - a^3*f*x)/((b*x^2 + a)*b 
^4) + 1/15*(3*b^8*f*x^5 + 5*b^8*e*x^3 - 10*a*b^7*f*x^3 + 15*b^8*d*x - 30*a 
*b^7*e*x + 45*a^2*b^6*f*x)/b^10
 
3.2.26.9 Mupad [B] (verification not implemented)

Time = 5.87 (sec) , antiderivative size = 153, normalized size of antiderivative = 0.94 \[ \int \frac {x^2 \left (c+d x^2+e x^4+f x^6\right )}{\left (a+b x^2\right )^2} \, dx=x^3\,\left (\frac {e}{3\,b^2}-\frac {2\,a\,f}{3\,b^3}\right )-x\,\left (\frac {a^2\,f}{b^4}-\frac {d}{b^2}+\frac {2\,a\,\left (\frac {e}{b^2}-\frac {2\,a\,f}{b^3}\right )}{b}\right )-\frac {x\,\left (-\frac {f\,a^3}{2}+\frac {e\,a^2\,b}{2}-\frac {d\,a\,b^2}{2}+\frac {c\,b^3}{2}\right )}{b^5\,x^2+a\,b^4}+\frac {f\,x^5}{5\,b^2}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (-7\,f\,a^3+5\,e\,a^2\,b-3\,d\,a\,b^2+c\,b^3\right )}{2\,\sqrt {a}\,b^{9/2}} \]

input
int((x^2*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2)^2,x)
 
output
x^3*(e/(3*b^2) - (2*a*f)/(3*b^3)) - x*((a^2*f)/b^4 - d/b^2 + (2*a*(e/b^2 - 
 (2*a*f)/b^3))/b) - (x*((b^3*c)/2 - (a^3*f)/2 - (a*b^2*d)/2 + (a^2*b*e)/2) 
)/(a*b^4 + b^5*x^2) + (f*x^5)/(5*b^2) + (atan((b^(1/2)*x)/a^(1/2))*(b^3*c 
- 7*a^3*f - 3*a*b^2*d + 5*a^2*b*e))/(2*a^(1/2)*b^(9/2))